package com.swift.authority.service.user;


import com.swift.authority.common.exception.BusinessException;
import com.swift.authority.core.user.request.UserReq;
import com.swift.authority.core.user.response.UserRes;

import java.net.UnknownHostException;

/**
 * @author Administrator
 * @description :
 * @date 2022/06/18 16:15
 * @since open jdk 1.8
 */
public interface UserService {
    /**
     * @description 用户注册
     * @param user user
     * @return User
     */
    public void userAdd(UserReq user) throws UnknownHostException, BusinessException;
    /**
     * @description 用户登录
     * @param user user
     * @return User
     */
    public UserRes login(UserReq user) throws BusinessException;
    /**
     * @description 根据id查询用户信息
     * @param id id
     * @return User
     */
    public UserRes queryUserInfoById(int id);

    /**
     * @description 根据用户名判断用户是否存在
     * @param userName 用户名
     * @return Boolean
     */
    public UserRes queryUserByUserName(String userName);

}
